#ifndef MEMCHUNKDIALOG_H
#define MEMCHUNKDIALOG_H

#include <QDialog>
#include "tools.h"

namespace Ui {
class MemChunkDialog;
}

class MemChunkDialog : public QDialog
{
    Q_OBJECT
    
public:

    enum
    {
        V_AbsoluteOffset = 1,
        V_RelativeOfset = 2,

        V_Ascii = 4
    };

    explicit MemChunkDialog( const QByteArray &d,
                             u32 addr,
                             u32 viewMode = V_AbsoluteOffset | V_Ascii,
                             QWidget *parent = 0 );
    ~MemChunkDialog();

    static void ShowArray( const QByteArray &d,
                                          u32 addr,
                                          u32 viewMode = V_AbsoluteOffset | V_Ascii,
                                          QWidget *parent = 0 );

    static QByteArray MakeHexDump( const QByteArray &d,
                                   u32 addr,
                                   u32 viewMode = V_AbsoluteOffset | V_Ascii );

private slots:
    void on_pushButton_clicked();

private:
    Ui::MemChunkDialog *ui;
};

#endif // MEMCHUNKDIALOG_H
